package cn.getech.data.development.constant;

import lombok.Getter;

@Getter
public enum UdfUsableType {

    DISUSABLE(0 , "不可用" ),
    USABLE(1, "可用" );
    private  int code;
    private  String  name;
    UdfUsableType(int id , String  name){
        this.code = id;
        this.name = name;
    }

    public static UdfUsableType ObjOf(Integer code) {
        if (code == null) {
            return null;
        } else {
            for (UdfUsableType s : UdfUsableType.values()) {
                if (s.getCode() == code) {
                    return s;
                }
            }
            return null;
        }
    }
}
